|
Command: |
Verify a MAC and (if successful) generate a MAC on the same data using a different key. |
|
Notes: |
The message with which the MAC is to be verified and translated may be presented to the HSM in different formats, as indicated by the Input Format Flag field. When Input Format Flag = 2, the input message goes through a conversion process (from EBCDIC to ASCII) when the HSM is configured as using EBCDIC. |
|
Field |
Length & Type |
Details | |
|
COMMAND MESSAGE |
|||
|
Message Header |
m A |
Will be returned to the Host unchanged. |
|
|
Command Code |
2 A |
Value “MY”. |
|
|
Mode Flag |
1 N |
0 : Only block of a single-block message |
|
|
Input Format Flag |
1 N |
0 : Binary |
|
|
Source MAC Algorithm |
2 N |
01 : ISO 9797 MAC algorithm 1 (= ANSI
X9.9 when used with a single-length key) |
|
|
Source Padding Method |
1 N |
For Source MAC Algorithm values 01
& 03: For all other Source MAC Algorithm
values: |
|
|
Source Key Type |
3 H |
Type of Source Key. The following Key Types are permitted: 003 : TAK |
|
|
Source Key |
16H |
Source MAC Key. |
|
|
Destination MAC Algorithm |
2 N |
01 : ISO 9797 MAC algorithm 1 (= ANSI
X9.9 when used with a single-length key) |
|
|
Destination Padding Method |
1 N |
For Destination MAC Algorithm values
01 & 03: For all other Destination MAC Algorithm
values: |
|
|
Destination Key Type |
3 H |
Type of Destination Key. The following Key Types are permitted: 003 : TAK |
|
|
Destination Key |
16H |
Destination MAC Key. |
|
|
Source IV |
16 H |
The intermediate IV, calculated using
the Source Key. Only present if Mode Flag = 2 or 3 |
|
|
Destination IV |
16 H |
The intermediate IV, calculated using
the Destination Key. Only present if Mode Flag = 2 or 3. |
|
|
Message Length |
4 H |
The length of the following field, in bytes. |
|
|
Message |
|
The message upon which the MAC is to be verified and regenerated. The length & type of the field will depend on the value of the Mode Flag & Input Format Flag: |
|
|
n B |
Input Format Flag = 0 (Binary); |
||
|
n H |
Input Format Flag = 1 (Hex-encoded
Binary); |
||
|
n A |
Input Format Flag = 2 (Text); |
||
|
Source MAC |
8 H |
The MAC to be verified, generated using
the Source Key. |
|
|
End Message Delimiter |
1 C |
Optional. Must be present if a message trailer is present. Value X'19. |
|
|
Message Trailer |
n A |
Optional. Maximum length 32 characters. |
|
|
RESPONSE MESSAGE |
|||
|
Message Header |
m A |
Will be returned to the Host unchanged. |
|
|
Response Code |
2 A |
Value “MZ”. |
|
|
Error Code |
2 N |
00 : No error Any standard error code. |
|
|
Source IV |
16 H |
The intermediate IV, calculated using
Source Key. |
|
|
Destination IV |
16 H |
The intermediate IV, calculated using
Destination Key. |
|
|
Destination MAC |
8 H |
The MAC generated using the Destination
Key. |
|
|
End Message Delimiter |
1 C |
Will only be present if present in the command message. Value X'19. |
|
|
Message Trailer |
n A |
Will only be present if present in the command message. Maximum length 32 characters. |
|
|
|
|
|
|